package com.invengo.library_rfid.utils;

import android.text.TextUtils;

import java.util.HashMap;

public class EPCUtils {
    static HashMap<String, String> BookCode = new HashMap<String, String>() {{
        put("0088102BC12013160030E188", "CC420800B46044002090BC8D");
        put("0088102BC12013160030E18E", "CC420800BC6044002120D8B1");
        put("0088102BC12013160030E185", "CC420800B46044002090BC8D");
        put("0088102BC12013160030E18B", "CC420800B86044001810B4DE");
    }};
    public static HashMap<String, String> baorCode = new HashMap<String, String>() {{
        put("02401120301", "E200680A0000400182E3ACDA");
        put("02401120303", "E200680A0000400239A070BC");
        put("02401120301", "E200680A00004000072634C7");
        put("02401120302", "E200680A0000400239A1F4D4");
    }};


    public static String scanChangeBook(String epc) {
        String s = BookCode.get(epc);
        return TextUtils.isEmpty(s) ? "CC420800B46044002090BC8D" : s;
    }

    public static String changeBarCode(String code) {
        String s = baorCode.get(code);
        return TextUtils.isEmpty(s) ? "A0106083" : s;
    }

    public static String scanChangeShelf(String epc) {
        return "01030106100102";
    }
}
